DateTime.Now.StringDayOfWeek([Culture])

.StringDayOfWeek([Culture]) property converts the day of the week portion of the DateTime object into a string and returns it. If the optional Culture parameter is filled in, the string will be for the language and culture specified. If this is left blank, the Day of the week will use your server's culture setting.

Applies To

Properties and Methods

None

Available

The .StringDayOfWeek([Culture]) method is available in:

  • 15.03.016
  • All newer builds

Type

String

Syntax

DateTime.Now.StringDayOfWeek([Culture]);

Parameters

Parameter

Required

Description

Culture

No

A string that represents the language and country to set the culture. The format is ll-CC, where ll represents the language and CC represents the Country.

A list of available cultures can be found here.

Example

var lcDay = DateTime.Today.StringDayOfWeek();

var lcDayFR = DateTime.Today.StringDayOfWeek('fr-FR');

 

Event.Form.MessageBox('Default (en-US): ' + lcDay +

'\nFrench (fr-FR): ' + lcDayFR);

 

/* Expected Prompt response:

Default (en-US): Wednesday

French (fr-FR): mercredi

*/